package com.my.chapter15;

public class practice20 {
    static <T extends Top> void f(T obj) {
        obj.f();
        obj.g();
        //obj.a();
        // a() is not part of an interface
    }

    public static void main(String[] args) {
        f(new CombinedImpl());
    }
}

interface Top {
    void f();
    void g();
}

class CombinedImpl implements Top {
    public void f() { System.out.println("Top::f()"); }
    public void g() { System.out.println("Top::g()"); }
    public void a() {
        System.out.println("CombinedImpl::a()");
    }
}


